﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TimeTracker.data
{
    class RedminePhpConnector:AbstractConnector
    {
        public static AbstractConnector GetInstance()
        {
            return (_instance ?? (_instance = new RedminePhpConnector()));
        }

        public override Dictionary<string, Project> LoadProjects()
        {
            throw new NotImplementedException();
        }

        public override SortedDictionary<int, Task> LoadTasks(Project project)
        {
            throw new NotImplementedException();
        }

        public override bool SelectProject(string name)
        {
            SelectedProject = Projects[name];
            return SelectedProject.LoadTasks();
        }

        public override bool CanAddTimeToProject()
        {
            return true;
        }

        public override bool Login(string server, string user, string password)
        {
            this.server = server;
            this.user = user;
            this.pass = password;

            throw new NotImplementedException();

            loggedIn = true;

            return loggedIn;
        }

        public override bool LoggedIn()
        {
            return this.loggedIn;
        }
    }
}
